# Tmux config

# Set fish to default shell 
set-option -g default-shell /usr/bin/fish

set-option -sg escape-time 10
set-option -g focus-events on

# Good colors
# set-option -sa terminal-overrides ',XXX:RGB'
# 24bit, even better
# set-option -sa terminal-overrides ",xterm*:Tc"
set -g default-terminal "screen-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"

set -g history-limit 100000
set -g mouse on
set -g xterm-keys on
setw -g aggressive-resize on

# Position pane
set -g status-position top

# Start windows and panes at 1, not 0
set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on

# Act like vim
set-window-option -g mode-keys vi
setw -g status-keys vi

# keybindings
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel

# Start split at the same location as the previous pane
bind '"' split-window -v -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"

# Reload this conf file with ctrl+r
unbind r
bind r source-file ~/.config/tmux/tmux.conf

set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# set -g @plugin 'joshmedeski/t-smart-tmux-session-manager'
set -g @plugin 'dracula/tmux'
# set -g @plugin 'christoomey/vim-tmux-navigator'

# Dracula
set -g @dracula-show-powerline true

# available plugins: battery, cpu-usage, git, gpu-usage, ram-usage, tmux-ram-usage, network, network-bandwidth, network-ping, ssh-session, attached-clients, network-vpn, weather, time, mpc, spotify-tui, kubernetes-context, synchronize-panes
set -g @dracula-plugins "kubernetes-context gpu-usage network-ping network-bandwidth tmux-ram-usage ram-usage cpu-usage"

# available colors: white, gray, dark_gray, light_purple, dark_purple, cyan, green, orange, red, pink, yellow
# set -g @dracula-[plugin-name]-colors "[background] [foreground]"
set -g @dracula-git-colors "dark_gray yellow"
set -g @dracula-kubernetes-context-colors "dark_gray cyan"
set -g @dracula-attached-clients-colors "dark_gray white"
set -g @dracula-network-ping-colors "green dark_gray"
set -g @dracula-network-bandwidth-colors "yellow dark_gray"
set -g @dracula-gpu-usage-colors "cyan dark_gray"
set -g @dracula-ram-usage-colors "orange dark_gray"
set -g @dracula-tmux-ram-usage-colors "orange gray"
set -g @dracula-cpu-usage-colors "red dark_gray"
set -g @dracula-time-colors "gray white"

# Configure separtioni:  █     
set -g @dracula-show-left-sep ""
set -g @dracula-show-right-sep ""

# it can accept `session`, `smiley`, `window`, or any character.
set -g @dracula-show-left-icon session

# Set the minimum number of clients to show (otherwise, show nothing)
set -g @dracula-clients-minimum 1

# Enable window flags
set -g @dracula-show-flags true

# the default is 5, it can accept any number
set -g @dracula-refresh-rate 2

# Show system load average instead of CPU usage percentage (default)
set -g @dracula-cpu-display-load true

# Ping settings
set -g @dracula-ping-server "duckduckgo.com"
set -g @dracula-ping-rate 60

# Time settings
set -g @dracula-show-timezone false
set -g @dracula-military-time true
set -g @dracula-show-fahrenheit false

# default git is unicode no message
set -g @dracula-git-no-repo-message ""
set -g @dracula-git-show-remote-status false

# Kubernetes settings
set -g @dracula-kubernetes-hide-user true

# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.config/tmux/plugins/tpm/tpm'
